package IO;

import java.io.FileWriter;
import java.io.IOException;

public class FileWirter {
    public static void main(String[] args) {
        FileWriter writer =null;
        try {
            writer =new FileWriter("D:\\BanGong\\TestFile\\temm.txt",true);
            //写入
            char[]chars ={'\n','生','亦','何','欢','，','死','亦','何','惧'};
            writer.write(chars,0, chars.length);
            //刷新
            writer.flush();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
